package pro.shushi.pamirs.demo.api.model;

import pro.shushi.pamirs.meta.annotation.Field;
import pro.shushi.pamirs.meta.annotation.Model;
import pro.shushi.pamirs.meta.base.IdModel;

@Model.model(DemoPurchaseDetail.MODEL_MODEL)
@Model(displayName = "测试订单明细", labelFields = "name")
public class DemoPurchaseDetail extends IdModel {

    private static final long serialVersionUID = 7111442335940770423L;

    public static final String MODEL_MODEL = "demo.DemoPurchaseDetail";

    @Field.Integer
    @Field(displayName = "采购单ID")
    private Long purchaseOrderId;

    @Field.String
    @Field(displayName = "名称")
    private String itemName;

    @Field.Integer
    @Field(displayName = "商品ID")
    private Long itemId;

    @Field.many2one
    @Field.Relation(relationFields = {"itemId"}, referenceFields = {"id"})
    @Field(displayName = "商品")
    private DemoItem item;

    @Field.Integer
    @Field(displayName = "商品数量")
    private Long quantity;



}
